const Service = require('egg').Service;

class userService extends Service {
    async index(request) {
        const { ctx } = this;
        const { id } = request;
        var msg,code;
        var res = await ctx.model.User.find({_id:id});
        if(res.length){
            code = 200
            msg = "用户信息"
        }else{
            code = 400
            msg = "未找到用户"
        }
        return {code,msg,res}
    };
}
module.exports = userService